import request from '@/utils/request/request';
import { MenuRecord } from './model/menuModel';

// 查询菜单树
export function queryMenuRecordTree() {
  return request.get('/api/system/menu/listTree');
}

// 保存菜单
export function saveMenuRecord(data: MenuRecord) {
  return request.post('/api/system/menu', {
    ...data,
  });
}

// 修改菜单信息
export function updateMenuRecord(data: MenuRecord) {
  return request.put('/api/system/menu', {
    ...data,
  });
}

// 删除菜单
export function deleteMenuRecord(ids: string[]) {
  return request.delete('/api/system/menu', { data: ids });
}
